package cn.bugstack.springframework.beans.factory;

/**
 * <p>reference: DerekYRC https://github.com/DerekYRC/mini-spring
 * <p>Interface to be implemented by beans that want to release resources
 * on destruction. A BeanFactory is supposed to invoke the destroy
 * method if it disposes a cached singleton. An application context
 * is supposed to dispose all of its singletons on close.
 *
 * @author Yaxi.Zhang
 * @since 2022/12/18 08:17
 */
public interface DisposableBean {

    void destroy() throws Exception;

}
